//
//  YGKFlagCell.m
//  GatherFlag
//
//  Created by CoderSUX on 16/7/6.
//  Copyright © 2016年 CoderSUX. All rights reserved.
//

#import "YGKFlagCell.h"

@interface YGKFlagCell()

@property (weak, nonatomic) IBOutlet UILabel *flag_idLabel;
@property (weak, nonatomic) IBOutlet UILabel *y_codeL;
@property (weak, nonatomic) IBOutlet UILabel *x_codeL;
@property (weak, nonatomic) IBOutlet UILabel *typeL;
@property (weak, nonatomic) IBOutlet UILabel *road_idL;
@property (weak, nonatomic) IBOutlet UILabel *loc_numberL;
@property (weak, nonatomic) IBOutlet UILabel *descriptionL;

@end

@implementation YGKFlagCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setFlag:(Flag *)flag
{
    _flag = flag;
    self.flag_idLabel.text = [NSString stringWithFormat:@"标识点id: %@",flag.flag_id];
    self.x_codeL.text = [NSString stringWithFormat:@"经度: %f",[flag.x_code floatValue]];
    
    self.y_codeL.text = [NSString stringWithFormat:@"纬度: %f",[flag.y_code floatValue]];
    if ([flag.type isEqualToString:@"1"]) {
        
        self.typeL.text = @"标识点类型: 收费站";
    }else if([flag.type isEqualToString:@"2"])
    {
        self.typeL.text = @"标识点类型: 路径标识点";
    }else
    {
        self.typeL.text = @"标识点类型:未知的错误类型";
    }
    self.road_idL.text = [NSString stringWithFormat:@"路段标识: %@",flag.road_id];
    self.loc_numberL.text = [NSString stringWithFormat:@"桩号: %@",flag.loc_num];
    self.descriptionL.text = [NSString stringWithFormat:@"标识点说明: %@",flag.des];
}

@end
